print("字符串")
name = 'xaiohei is a smart boy'
print(name.index('i'))
name2 = name.replace('i', 'a')
print(name2)
name3 = name.split('i')
print(type(name3), name3)
name4 = ' xaiohei is smart boy '
name5 = name4.strip()
print(name5)
name6 = name.strip('x')
print(name6)
count2 = name.count('i')
print("字符串中i出现的次数是：", count2)
count3 = len(name)
print("字符串的长度是：", count3)
i = 0
while i < len(name):
    print(name[i])
    i += 1
for i in name:
    print(i)
